home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
59193
/
59193.xpi
/
chrome
/
manman89grablink.jar
/
content
/
firefoxOverlay.xul
< prev
next >
Wrap
Extensible Markup Language
|
2010-01-14
|
3KB
|
73 lines
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE overlay SYSTEM "chrome://manman89grablink/locale/manman89grablink.dtd">
<overlay id="manman89grablink-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script src="overlay.js"/>
<script type="application/x-javascript">
<![CDATA[
window.addEventListener("load",manman89grablinkInit,false);
function manman89grablinkInit() {
var menu = document.getElementById("contentAreaContextMenu");
menu.addEventListener("popupshowing", manman89grablinkShowHide, false);
manman89grablink.set_menu_event('context-manman89grablink', 'manman89grablink.upload_selected()');
}
function manman89grablinkShowHide() {
if (gContextMenu)
{
var isTextSelected = false;
var node = document.commandDispatcher.focusedElement;
if (node == undefined || node == null){
isTextSelected = gContextMenu.isTextSelected;
}else{
var nodeLocalName = node.localName.toUpperCase();
if ((nodeLocalName == "TEXTAREA") || (nodeLocalName == "INPUT" && (node.type.toUpperCase() == "TEXT" || node.type.toUpperCase() == "FILE")) || nodeLocalName == "TEXTBOX" ) {
isTextSelected = true;
}
}
var manman89grablinkMenu = document.getElementById('context-manman89grablink');
if(isTextSelected){
manman89grablink.set_menu_event('manman89grablink.upload_selected()');
manman89grablink.set_menu_caption(' COPY TEXT FROM SELECTED TEXT');
document.getElementById('context-manman89grablink1').style.display="block";
document.getElementById('context-manman89grablink2').style.display="none";
}else
{
document.getElementById('context-manman89grablink1').style.display="none";
document.getElementById('context-manman89grablink2').style.display="block";
manman89grablink.set_menu_event("manman89grablink.go_to_site('http://www.vn-new.com')");
manman89grablink.set_menu_caption(' SCAN LINK - GO TO VN-NEW.COM');
}
}
}
]]>
</script>
<popup id="contentAreaContextMenu">
<menuitem id="context-manman89grablink" label="&manman89grablink.label;"
accesskey="&manman89grablinkContext.accesskey;"
insertafter="context-stop"
class="menuitem-iconic"
image="chrome://manman89grablink/content/manman89grablink_small.png"/>
<menuitem id="context-manman89grablink1" label=" COPY ALL LINK FROM SELECTED TEXT"
accesskey="c"
insertafter="context-stop"
class="menuitem-iconic"
oncommand="manman89grablink.OnCommand('sel')"
image="chrome://manman89grablink/content/manman89grablink_small.png"/>
<menuitem id="context-manman89grablink2" label=" COPY ALL LINK FROM CURRENT PAGE"
accesskey="c"
insertafter="context-stop"
class="menuitem-iconic"
oncommand="manman89grablink.OnCommand('all')"
image="chrome://manman89grablink/content/manman89grablink_small.png"/>
</popup>
</overlay>